<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/header.jsp"%>
<title>员工维护</title>
</head>
<body>
    <fieldset class="layui-elem-field" style="margin: 20px;padding:15px;">
        <legend>员工维护--修改信息</legend>
    <form class="layui-form" lay-filter="formA" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">编号</label>
            <div class="layui-input-inline">
                <input type="text" name="code" readonly lay-verify="required" placeholder="请输入编号" autocomplete="off"
                    class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">新密码</label>
            <div class="layui-input-inline">
                <input type="password" name="pass" placeholder="请输入新密码" autocomplete="off"
                    class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <div class="layui-input-inline">
                <input type="button" class="layui-btn" lay-submit lay-filter="updPass" value="确定" />
                <input type="button" class="layui-btn" onclick="closeThis()" value="取消" />
            </div>
        </div>
        <input type="hidden" name="action" value="updPass" />
    </form>
    </fieldset>
<script type="text/javascript">
init();
function init(){
    var code = '<%=request.getParameter("code")%>';
    $('input[name="code"]').val(code);
//     ajax("/employee",{action:'get',code:code},'json',function(data){//console.log(data)
//     	form.val("formA", {name: data.name,code:data.code,tel:data.tel})
//     });
}
formSubmit('/employee', 'submit(updPass)', 'text', function(data) {
	if (data == 1) {
        layer.msg('修改成功',closeThis);
    } else {
        layer.msg('修改失败');
    }
});
</script>
</body>
</html>